home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / async.zip / STKSIZ.C < prev    next >
Text File  |  1986-10-09  |  1KB  |  22 lines

  1. #if sizeof(char *) == 4
  2. int _STKSIZ = 8192/16;  /* (in paragraphs) (large data model) */
  3. int _STKRED = 1024;        /* size of RED zone (in bytes) */
  4. #else
  5. int _STKSIZ = 512/16;  /* (in paragraphs) */
  6. int _STKRED = 2048;        /* size of RED zone (in bytes) */
  7. #endif
  8.  
  9. int _HEAPSIZ = 512/16; /* (in paragraphs) */
  10. int _STKLOW = 1;        /* default is stack above heap (small only) */
  11.  
  12. /*
  13. NOTE: The RED zone is used for stack saftey checking.  With stack above heap,
  14. the heap will not be allowed to get within STKRED bytes of the current value
  15. of the SP, if limit checking is enabled (see the cc +b option), SP isn't
  16. allowed any closer than STKRED bytes to the top of the heap.  If stack below
  17. heap and limit checking is enabled, SP isn't allowed any closer than STKRED
  18. bytes to _Utop.  Minimum stack size = 2*_STKRED.  Minimum value for STKRED
  19. should be about 256 bytes.  This allows some margin to issue DOS calls and
  20. allow interrupt handlers to execute.  (Some people think that this should
  21. be > 1k.) */
  22.